package com.fruits.login.model;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
/**
 * @author cyc
 * 封装返回信息
 */
public class ReturnMsg {

    /**返回成功*/
    public static final int SUCCESS = 1;

    /**返回失败*/
    public static final int FAILE = 0;
    /**返回失败*/
    public static final int ERROR = 3;

    private String info;
    private JSONArray result = new JSONArray();
    private int state = 0;

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public JSONArray getResult() {
        return result;
    }

    public void setResult(JSONArray result) {
        this.result = result;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public void addJSONObject(JSONObject json) {
        result.add(json);
    }

    @Override
    public String toString() {
        return "ReturnMsg{" + "info='" + info + '\'' + ", result=" + result + ", state=" + state + '}';
    }

}
